<template>
    <div class="detail-bottom-bar">
        <div class="bar-left item">
            <div class="service left">
                <span class="iconfont icon-kefu1"></span>
                <div>客服</div>
            </div>
            <div class="shop left">
                <span class="iconfont icon-dianpu"></span>
                <div>店铺</div>
            </div>
            <div class="collect left">
                <span class="iconfont icon-shoucang1"></span>
                <div>收藏</div>
            </div>
        </div>
        <div class="bar-right item">
            <el-button class="car right"  @click="addToCart">加入购物车</el-button>
            <!-- <div class="" >加入购物车</div> -->
            <div class="buy right">购买</div>
        </div>
    </div>
</template>

<script>
export default {
    data () {
        return {
            
        }
    },
    methods:{
        //加入
        addToCart(){
           //加入购物车这个操作应该在父组件里进行
           this.$emit('addToCart')
        }
    }
};
</script>

<style lang="less" scoped>
.detail-bottom-bar{
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 49px;
    background-color:white;
    display: flex;
    .bar-left{
        display: flex;
        text-align: center;
        padding-top: 5px;


        
    }
    .bar-right{
        display: flex;
        text-align: center;
        color: white;
        line-height: 49px;
        .car{
            background-color: yellow;
            font-size: 16px;
            color: white;
        }
        .buy{
            background-color: pink;
        }
    }
}
.item{
    flex: 1;
}
.left{
    flex: 1;
}
.right{
    flex: 1;
}


</style>

